'use strict';

module.exports = app => {
  const { STRING, TINYINT, INTEGER, DECIMAL } = app.Sequelize;

  const OrderMaster = app.model.define('order_master', {
    order_id: {
      allowNull: false,
      primaryKey: true,
      type: STRING,
    },
    uid: INTEGER,
    username: STRING,
    count: INTEGER,
    start_city: STRING,
    end_city: STRING,
    pay_status: TINYINT,
    amount: DECIMAL(8, 2),
    train_num: STRING,
  });

  return OrderMaster;
};
